c59808
@@ -34,8 +34,7 @@
public class HelloWorldConsumer extends ScheduledPollConsumer {
     }
 
     @Override
-    // poll method will fire every 500 ms by default 
-    protected void poll() throws Exception {
+    protected int poll() throws Exception {
         Exchange exchange = endpoint.createExchange();
 
         // create a message body
@@ -45,12 +44,12 @@
public class HelloWorldConsumer extends ScheduledPollConsumer {
         try {
             // send message to next processor in the route
             getProcessor().process(exchange);
+            return 1; // number of messages polled
         } finally {
             // log exception if an exception occurred and was not handled
             if (exchange.getException() != null) {
                 getExceptionHandler().handleException("Error processing exchange", exchange, exchange.getException());
             }
-        }        
+        }
     }
-
 }
